package com.wsy.service;

import com.wsy.entity.Customer;
import com.wsy.entity.Line;
import com.wsy.mapper.AdminMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminService {

    @Autowired
    AdminMapper adminMapper;

    public List getLine(){
        List getLine =adminMapper.getLine();
        return getLine;
    }
    public List getGroupbuy(){
        List getLine =adminMapper.getGroupbuy();
        return getLine;
    }
//    查询是否为团购线路
    public List GetTeamBuy(){
        List getLine =adminMapper.GetTeamBuy();
        return getLine;
    }
//查询线路类型
    public List getLineType(){
        List getLine =adminMapper.getLineType();
        return getLine;
    }

//    添加线路
    public int PostLine(Line line){
        return adminMapper.PostLine(line);
    }

    //    修改线路
    public int PutLine(Line line){
        return adminMapper.PutLine(line);
    }

    //    设置团购
    public int PutBuy(Line line){
        System.out.println(line);
        return adminMapper.PutBuy(line);
    }

//    订单查询
    public List<Line> getOrder(){
        return adminMapper.getOrder();
    }

//   删除订单
    public int delOrder(int id){
        return adminMapper.delOrder(id);
    }

    //   删除订单
    public int delCustomer(int id){
        return adminMapper.delCustomer(id);
    }

    //   查询用户
    public List<Line> getCustomer(Line line){
        return adminMapper.getCustomer(line);
    }

}
